import Request from '@/axios/request'

export function getSystemModels(params) {
  return Request.get('system-models', { params })
}

export function createSystemModel() {
  return Request.get('system-models/create')
}

export function storeSystemModel(data) {
  return Request.post('system-models', data)
}

export function updateSystemModel(id, data) {
  return Request.put(`system-models/${id}`, data)
}

export function updateSystemModels(data) {
  return Request.put(`system-models`, data)
}

export function editSystemModel(id, params) {
  return Request.get(`system-models/${id}/edit`, { params })
}

export function destroySystemModel(id) {
  return Request.delete(`system-models/${id}`)
}

export function getSystemModelsField(id, params) {
  return Request.get(`system-models/${id}`, { params })
}

export function updateSystemModelField(data,id) {
  return Request.put(`system-models/${id}/updateField`, data)
}

export function importSystemModels(data) {
  return Request.post('system-models/by-import', data)
}